﻿


using System;
using System.Text;
using System.Collections;
using System.Xml;
using System.Data;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Resources;
using System.Reflection;
using System.Globalization;
using System.Threading;

using Telerik.WebControls;
using UFSoft.UBF.UI.WebControls;
using UFSoft.UBF.UI.WebControls.InterActionComponenet;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.Util.Context;

//using MagicAjax.UI.Controls;
using UFSoft.UBF.Report.UI.ReportView.Web;
using UFSoft.UBF.UI.WebControlAdapter;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.IView;
using UFSoft.UBF.UI.Engine;
using UFSoft.UBF.UI.Engine.Builder;
using UFSoft.UBF.UI.Engine.Authorization;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.ControlModel;
using UFSoft.UBF.UI.Controls;
using UFSoft.UBF.UI.WebControls.Association;
using UFSoft.UBF.UI.WebControls.ClientCallBack;
using System.Web.UI;
using UFSoft.UBF.UI.UIFormPersonalization;
using System.Collections.Specialized;


/***********************************************************************************************
 * Form ID:a3a8b5fe-0231-4a26-b171-16e2044072fa 
 * Form Name:SelectGetPlanPrice
 * UIFactory Auto Generator
 ***********************************************************************************************/
namespace UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI.SelectsGetPlanPrice
{
	[FormRegister("UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI.SelectsGetPlanPrice.SelectGetPlanPriceWebPart", "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI.WebPart", "a3a8b5fe-0231-4a26-b171-16e2044072fa","WebPart", "True", 315, 250)] 
	///insert into aspnet_Parts (SysVersion, Path, ClassName, [Assembly], FormId) values (0, 'UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI', 'UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI.SelectsGetPlanPrice.SelectGetPlanPriceWebPart', 'UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDUI.WebPart', 'a3a8b5fe-0231-4a26-b171-16e2044072fa')
	///<siteMapNode url="~/erp/simple.aspx?lnk=a3a8b5fe-0231-4a26-b171-16e2044072fa" title="SelectGetPlanPrice"/>
    public partial class SelectGetPlanPriceWebPart : UFSoft.UBF.UI.FormProcess.BaseWebForm
    {
		#region Page Controller/Code Behind
        private static readonly ILogger logger = LoggerManager.GetLogger(typeof(SelectGetPlanPriceWebPart));
        private string assemblyName = System.Reflection.Assembly.GetExecutingAssembly().FullName;
        //private string displayNamePostfix = "displayName";

		#region 强类型化基类属性.
		public new SelectsGetPlanPriceAction Action
		{
			get { return (SelectsGetPlanPriceAction)base.Action; }
			set { base.Action = value; }
		}
		SelectsGetPlanPriceModel _uimodel=null;
		public new SelectsGetPlanPriceModel Model
		{
			get 
			{
			     if(_uimodel == null){
			          _uimodel = new SelectsGetPlanPriceModel();
			     }
			     return _uimodel; 
			}
			set { _uimodel = value; }
		}
        protected override IUIModel UIModel{
            get{
                return this.Model;
            }
            set{
                this.Model = value as SelectsGetPlanPriceModel;
            }
        }
		#endregion 
		public FormAdjust adjust;
        #region variable declaration
        IUFCard Card0;
        IUFFldDatePicker DatePicker0;
        IUFLabel Label108;
        IUFCard Card1;
        IUFButton BtnClose;
        IUFButton BtnOk;
		UpdatePanel updatePanel;
		HiddenField wpFindID;
		IUFContainer topLevelPanel;     
        IUFSeparator SeparatorInFavorites;
        IUFButton BtnDefaultValues;
        #endregion
        
        #region constructor
        public SelectGetPlanPriceWebPart()
        {
            FormID = "a3a8b5fe-0231-4a26-b171-16e2044072fa";
            IsAutoSize = bool.Parse("True");
            NewIsAutoSize = bool.Parse("True");
        }
        #endregion


	
            
	//获取档案版型结果: 

        #region eventBind and databind
        private void EventBind()
        {
			//事件绑定模板
				//Button控件事件
			this.BtnClose.Click += new EventHandler(BtnClose_Click);		
						
				//Button控件事件
			this.BtnOk.Click += new EventHandler(BtnOk_Click);		
						


            AfterEventBind();
        }
        #endregion            
        
		#region override method
		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad2(e);
		}
		protected override void OnLoadDataDo(EventArgs e)
		{
		    adjust.ProcessAdjustBeforeOnLoad(this);
			if (UIEngineHelper.IsDataBind(PageStatus, this))
			{
				if(this.Model==null){				        
					this.Model = new SelectsGetPlanPriceModel();
				}
				OnLoadConsumer(new InParameterModel[]{},new InParameterModel[]{});
				OnLoadData(this);
				this.IsDataBinding = true ; //加载完数据要绑定一次.目前加这.
			}
			else
			{
				//去除.已经移入到OnInit()中.
				//this.Model = (SelectsGetPlanPriceModel)this.CurrentState[this.TaskId.ToString()];
			}
			adjust.ProcessAdjustAfterOnLoadData(this);
		            AfterOnLoad();
            
            adjust.ProcessAdjustAfterOnLoad(this);
		}
		protected override void OnPreRender(EventArgs e)
		{
			base.OnPreRender2(e);
		}
        protected override void OnPreRenderDo(EventArgs e)
        {
            adjust.ProcessAdjustBeforeOnPreRender(this);
			base.OnPreRender(e);
			this.CurrentState[this.TaskId.ToString()] = this.Model;
			RegisterClearWebPartPadding();
            UFIDA.U9.UI.PDHelper.FormAuthorityHelper.SetWebPartAuthorization(this);
            
			if (IsDataBinding) //2006-9-7 可由开发人员控制
			{
				BeforeUIModelBinding();
								if(!Page.IsPostBack)
				{
					EnumTypeBinding.BindEnumControls(this);
				}
				UFIDA.U9.UI.Commands.CommandHelper.BindFlexData(this);
				adjust.ProcessAdjustBeforeDataBinding(this);
				if (this.IsOnlyDataBinding)
				{
					this.DataBinding();
				}
				adjust.ProcessAdjustAfterDataBinding(this);

				AfterUIModelBinding();
			}
			adjust.ProcessAdjustAfterOnPreRender(this);
        }
		protected override void OnInit(EventArgs e)
		{
			base.OnInit2(e);
		}
		protected override void OnInitDo(EventArgs e)
		{			 
			this.Page.InitComplete += new EventHandler(Page_InitComplete);
			WebPartBuilder.InitWebPart(this);
            this.Action = new SelectsGetPlanPriceAction(this);
            adjust = new FormAdjust();
		    CreateFormChildControls();
		}
        void Page_InitComplete(object sender, EventArgs e)
        {

            adjust.ProcessInit(this);
        }
        #endregion

      
        
        #endregion

	
		/// <summary>
        /// WebPart View
        /// </summary>
        #region view Create Contorls
        private void CreateFormChildControls()
        {
            IUFContainer _panel = UIControlBuilder.BuildTopLevelContainer(this,"SelectGetPlanPrice",true,315,250);
            CommonBuilder.ContainerGridLayoutPropBuilder(_panel, 1, 2, 0, 10, 10, 10, 10, 10);
			InitViewBindingContainer(this, _panel,  null, "", "", null, 1, "");
			UIControlBuilder.BuildContainerGridLayout(_panel, 10,new GridColumnDef[]{new GridColumnDef(295,bool.Parse("True"),"Title"),},new GridRowDef[]{new GridRowDef(190,bool.Parse("True")),new GridRowDef(25,bool.Parse("True")),});
            //???还有用么?
            topLevelPanel = _panel;    
            
            UIControlBuilder.BuildCommonControls(this,ref updatePanel,ref wpFindID);
            





	
			_BuilderControl_Card0(_panel);

		
			UIControlBuilder.BuilderUFControl(this.Card0, "1");		


	
			_BuilderControl_Card1(_panel);

		
			UIControlBuilder.BuilderUFControl(this.Card1, "2");		



		
     
			
			
            EventBind();
            AfterCreateChildControls();
            
        }        







	                   
        private IUFCard _BuilderControl_Card0(IUFContainer container)
        {
            IUFCard _UFCard = UIControlBuilder.BuildCard(container,"Card0",false,"none", true, true, "1","","5c8e8142-9155-43e4-a64a-e4cc8377669b");
			CommonBuilder.GridLayoutPropBuilder(container, _UFCard, 295, 190, 0, 0, 1, 1, "100");
            CommonBuilder.ContainerGridLayoutPropBuilder(_UFCard, 3, 5, 0, 5, 0, 0, 0, 0);
			InitViewBindingContainer(this, _UFCard,  null, "", "", null, 1, "");
			UIControlBuilder.BuildContainerGridLayout(_UFCard, 5,new GridColumnDef[]{new GridColumnDef(50,bool.Parse("True"),"Title"),new GridColumnDef(5,bool.Parse("True"),"Spacing"),new GridColumnDef(145,bool.Parse("True"),"Value"),},new GridRowDef[]{new GridRowDef(20,bool.Parse("True")),new GridRowDef(20,bool.Parse("True")),new GridRowDef(20,bool.Parse("True")),new GridRowDef(20,bool.Parse("True")),new GridRowDef(1,bool.Parse("False")),});
            this.Card0 = _UFCard;

            ///foreach UFCard下的所有控件，增加到此容器





				this.DatePicker0 = UIControlBuilder.BuilderDatePicker(_UFCard, "DatePicker0", true, true, true, "DateTime","Left", 0, 60, 0, 145, 20, 2, 2, 1, 1, "100",true,false,"","","4b6c0003-ccbe-4450-9ffb-9930972e9ff3");
			UIControlBuilder.BuilderUIFieldBindingControl(this, this.DatePicker0, "False", "", null, null, "");


		
			UIControlBuilder.BuilderUFControl(this.DatePicker0, "0");		
		 

				this.Label108 = UIControlBuilder.BuilderUFLabel(_UFCard, "Label108", "", "True", "True", "Left", 50, 20, 0, 2, 1, 1, "100","5d02c249-5899-41d2-a9fd-41396d20183f","5d02c249-5899-41d2-a9fd-41396d20183f");


								

		
			UIControlBuilder.BuilderUFControl(this.Label108, "1");		



		

            
            container.Controls.Add(_UFCard);
            return _UFCard;
        }

	                   
        private IUFCard _BuilderControl_Card1(IUFContainer container)
        {
            IUFCard _UFCard = UIControlBuilder.BuildCard(container,"Card1",false,"FunctionBar", true, true, "2","","213c29f5-c6ce-418d-a0ff-d384a6ee0673");
			CommonBuilder.GridLayoutPropBuilder(container, _UFCard, 295, 25, 0, 1, 1, 1, "100");
            CommonBuilder.ContainerGridLayoutPropBuilder(_UFCard, 6, 1, 0, 0, 0, 0, 10, 0);
			InitViewBindingContainer(this, _UFCard,  null, "", "", null, 1, "");
			UIControlBuilder.BuildContainerGridLayout(_UFCard, 0,new GridColumnDef[]{new GridColumnDef(5,bool.Parse("True"),"Value"),new GridColumnDef(80,bool.Parse("True"),"Spacing"),new GridColumnDef(30,bool.Parse("True"),"Spacing"),new GridColumnDef(80,bool.Parse("True"),"Spacing"),new GridColumnDef(10,bool.Parse("True"),"Spacing"),new GridColumnDef(80,bool.Parse("True"),"Spacing"),},new GridRowDef[]{new GridRowDef(20,bool.Parse("False")),});
            this.Card1 = _UFCard;

            ///foreach UFCard下的所有控件，增加到此容器





				this.BtnClose = UIControlBuilder.BuilderUFButton(_UFCard, true, "BtnClose", true, true, 80, 20, 5, 0, 1, 1, "100","", this.Model.ElementID,"",false,"020a5365-8f12-4970-b8df-17ce3ae60a68","020a5365-8f12-4970-b8df-17ce3ae60a68","400527f1-aae0-4463-8528-b67c09b028c1");
	

		
			UIControlBuilder.BuilderUFControl(this.BtnClose, "3");		


				this.BtnOk = UIControlBuilder.BuilderUFButton(_UFCard, true, "BtnOk", true, true, 80, 20, 1, 0, 1, 1, "100","", this.Model.ElementID,"",false,"626ebf9b-f65a-4dd5-8f32-96f84919878c","626ebf9b-f65a-4dd5-8f32-96f84919878c","636f9083-8a88-4e17-aa5e-22af0a141f8c");
	

		
			UIControlBuilder.BuilderUFControl(this.BtnOk, "2");		



		

            
            container.Controls.Add(_UFCard);
            return _UFCard;
        }





		#endregion
		

	}
}
